/**
 * 
 */
package cw.serviceImp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cw.entity.User;
import cw.mapper.UserMapper;
import cw.service.UserService;

/**
 * @author Administrator
 *
 */
@Service("UserService")
public class UserServiceImpl implements UserService {

	
	@Resource
	private UserMapper userMapper;
	
	/* (non-Javadoc)
	 * @see cw.service.UserService#deleteByPrimaryKey(java.lang.Integer)
	 */
	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return userMapper.deleteByPrimaryKey(id);
	}

	/* (non-Javadoc)
	 * @see cw.service.UserService#insert(cw.entity.User)
	 */
	@Override
	public int insert(User record) {
		// TODO Auto-generated method stub
		return userMapper.insert(record);
	}

	/* (non-Javadoc)
	 * @see cw.service.UserService#insertSelective(cw.entity.User)
	 */
	@Override
	public int insertSelective(User record) {
		// TODO Auto-generated method stub
		return userMapper.insertSelective(record);
	}

	/* (non-Javadoc)
	 * @see cw.service.UserService#selectByPrimaryKey(java.lang.Integer)
	 */
	@Override
	public User selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return userMapper.selectByPrimaryKey(id);
	}

	/* (non-Javadoc)
	 * @see cw.service.UserService#updateByPrimaryKeySelective(cw.entity.User)
	 */
	@Override
	public int updateByPrimaryKeySelective(User record) {
		// TODO Auto-generated method stub
		return userMapper.updateByPrimaryKeySelective(record);
	}

	/* (non-Javadoc)
	 * @see cw.service.UserService#updateByPrimaryKey(cw.entity.User)
	 */
	@Override
	public int updateByPrimaryKey(User record) {
		// TODO Auto-generated method stub
		return userMapper.updateByPrimaryKey(record);
	}

	/* (non-Javadoc)
	 * @see cw.service.UserService#queryUser(java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer)
	 */
	@Override
	public List<User> queryUser(String username, String description,
			Integer offset, Integer pageSize) {
		// TODO Auto-generated method stub
		return userMapper.queryUser(username, description, offset, pageSize);
	}

	/* (non-Javadoc)
	 * @see cw.service.UserService#getTotal(java.lang.String, java.lang.String)
	 */
	@Override
	public Integer getTotal(String username, String description) {
		// TODO Auto-generated method stub
		return userMapper.getTotal(username, description);
	}

}
